import request from "@/utils/request.js";

/**
 * 点击下一步将答案同步到数据库
 * @param data
 * @returns {*}
 */
export function addAnswer(data) {
    return request({
        url: '/answer/answer/addAnswer',
        method: 'post',
        data: data
    })
}

/**
 * 继续答题
 * @param paperId
 * @returns {*}
 */
export function resumeAssessment(paperId) {
    return request({
        url: '/answer/answer/resumeAssessment/' + paperId,
        method: 'get',
    })
}

/**
 * 获取试卷详情结果
 * @param paperId
 * @param delFlag
 * @param recordId
 * @returns {*}
 */
export function generalScore(paperId, delFlag, recordId) {
    return request({
        url: '/answer/answer/generalScore/' + paperId,
        method: 'get',
        params: {
            delFlag: delFlag,
            recordId: recordId,
        }
    })
}
